#pragma once

#include "Symbol.h"
#include "Trade.h"

class PairTrade
{
public:
	CString PairTradeID;
	Trade *BuyTrade;
	Trade *SellTrade;
	double ActualSpread;
	CString Status;
	CString Comparison;// Compare Symbol >/>=/</<=
	double RequiredSpred;
	bool Evalution;
	double RealizedSpread;
	CString PairSize;
	char Nature;//Trade Type -Buy/Sell/Short
	double Ratio;
	bool IsActive;
	bool IsExecuted;


public:
	PairTrade()
	{
		PairTradeID = "";
		ActualSpread = 0; 
		Status = "";
		Comparison = "<=";
		RequiredSpred = 0;
		Evalution = false;
		RealizedSpread = 0;
		PairSize = "";
		BuyTrade = new Trade();
		SellTrade= new Trade();
		Nature = 'B';
		Ratio = 1.0;
		IsActive = false;
		IsExecuted = false;
	}
    
	__declspec ( property ( get = GetDescription ) ) CString Description ;
    CString GetDescription( ) const;

	__declspec ( property ( get = GetTradeSummary ) ) CString TradeSummary ;
    CString GetTradeSummary( ) const;

	CString GetCellText(int col, bool title) const;
	int  GetColCount() const;

	PairTrade( const PairTrade& other );

	CString AssignPairTradeID();
	
};
